var Koa = require('koa');
var app = new Koa();
var fs = require('fs')
const router = require('koa-router')()
const co = require('co')
var F=require('./util')

app.use(router.routes());

router.get('/MP_verify_S2YjaVJR1Kr2ktUc.txt',co.wrap(function*(ctx) {
	ctx.body = yield F.readData('./MP_verify_S2YjaVJR1Kr2ktUc.txt', 'utf8');
}));

router.get('/getWxCode',co.wrap(function*(ctx) {
	console.log(ctx.query)
	ctx.body = ctx.query.code;
}));


app.listen(3031)